package com.niiwoo.civet.trade.enums;

import com.niiwoo.tripod.provider.exception.NoSuchEnumValueException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Created by wuke on 2018/05/21.
 */
@Getter
@AllArgsConstructor
public enum TeProjectFlagEnum {
    NO((byte) 0, "否"),
    YES((byte) 1, "是");

    private final Byte value;
    private final String desc;

    public static TeProjectFlagEnum enumOf(Byte value) {
        for (TeProjectFlagEnum unitEnum : values()) {
            if (unitEnum.value.equals(value)) {
                return unitEnum;
            }
        }
        throw new NoSuchEnumValueException("TeProjectFlagEnum:" + value);
    }

}
